package edu.biwu.po;

import java.io.Serializable;
import java.sql.Date;
import java.util.List;

public class User implements Serializable {

    private Integer id;
    /**
    * 用户名称
    */
    private String username;
    /**
    * 生日
    */
    private Date birthday;
    /**
    * 性别
    */
    private String gender;
    /**
    * 地址
    */
    private String address;

    /*一个用户可以创建多个订单*/
    private List<Order> orders;

    public User(Integer id, String username, Date birthday, String gender, String address) {
        this.id = id;
        this.username = username;
        this.birthday = birthday;
        this.gender = gender;
        this.address = address;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public List<Order> getOrders() {
        return orders;
    }

    public void setOrders(List<Order> orders) {
        this.orders = orders;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", birthday=" + birthday +
                ", gender='" + gender + '\'' +
                ", address='" + address + '\'' +
                ", orders=" + orders +
                '}';
    }
}